home *** CD-ROM | disk | FTP | other *** search
/ PC Media 4 / PC MEDIA CD04.iso / share / prog / gcoope10 / classes.txt < prev    next >
Encoding:
Text File  |  1994-07-21  |  3.3 KB  |  96 lines

  1.  
  2.         GCOOPE Version 1.0 BASIC Class library
  3.  
  4.         by Brian Lee Price
  5.  
  6.         Released as Public Domain  July, 1994.
  7.  
  8.  
  9.     The class library in the initial Version 1.0 release:
  10.  
  11.         Char
  12.         ShortInt
  13.         Unsigned
  14.         LongInt
  15.         Pointer
  16.         Dynmem
  17.         Collection
  18.         Array
  19.         LowStream
  20.         String
  21.         StdStream
  22.         Stream
  23.                 File
  24.  
  25.  
  26.         The classes Char, ShortInt, and Unsigned are flag classes,
  27.     normally requiring no instance memory unless inherited.  The
  28.     other base classes (no ancestors or special functionality) are
  29.     LongInt, and Pointer.
  30.  
  31.         Collection is actually more of a pseudo-class, it is an
  32.     example of a 'wrapper' class that provides an object oriented
  33.     interface to standard 'C' library type functions.  (In this
  34.     case the functions are defined in the kernel module listmgr.c).
  35.     It does not inherit any classes.
  36.  
  37.         LowStream is an example of an expansion class.  While it
  38.     does not inherit any classes, any class inheriting LowStream
  39.     must also have Dynmem as an ancestor.  LowStream adds low
  40.     level stream i/o capability to any Dynmem based class.
  41.  
  42.         StdStream is another example of a 'wrapper' class, it
  43.     provides an object oriented interface to the standard ANSI-C
  44.     stream i/o library functions.  It shares the same interface
  45.     specification as the Stream class.
  46.  
  47.         Stream is a special class, it provides high level stream
  48.     i/o to any user defined class that has low level stream i/o
  49.     using the same interface as LowStream.  It does not necessarily
  50.     need to be inherited in order to provide this functionality but
  51.     in most cases it will prove simpler to inherit it.
  52.  
  53.         Dynmem is a low level example of multiple inheritance,
  54.     while it could be implemented (and probably be more efficient)
  55.     as a base class, it is very simple to define it in terms of
  56.     an Unsigned and Pointer child.  Note the redefinition of
  57.     valueOf for both inherited classes by means of renaming them
  58.     to sizeOf and addressOf.
  59.  
  60.         Array class is a child of Dynmem and provides basic
  61.     dynamic array class functionality.  The provided methods
  62.     can work with items of various sizes but any one array sub-
  63.     class must use items of the same size.
  64.  
  65.         The String class is an especially potent mixture of
  66.     previously defined classes.  It combines an Array with
  67.     LowStream providing a construct which can be the target
  68.     of stream i/o operations, be addressed as an array of
  69.     characters, or be accessed as a string.  However, it should
  70.     be noted that string access is NOT to a null terminated
  71.     string.  The length of the string must be obtained through
  72.     the lengthOf generic.
  73.  
  74.         The last class defined in the initial release class
  75.     library is the File class.  This class inherits the
  76.     StdStream class and provides automatic file closing for
  77.     temporary files.
  78.  
  79.  
  80.         The provided classes are not meant to be a complete
  81.     set of basic class types, nor are they optimized in any
  82.     way.  However, they do serve to illustrate many of the
  83.     possible operations that can be performed with the GCOOPE
  84.     framework.  Frankly, I'm still experimenting with the
  85.     capabilities of the system.  As I develop higher level
  86.     constructs, I intend to let the need for a fuller and
  87.     richer set of base classes and generic methods make itself
  88.     apparent rather than blindly developing classes and methods
  89.     that may end up being unneccessary.
  90.  
  91.  
  92.  
  93.  
  94.  
  95.  
  96.